import dgRequest from '../'

export function getUsers(params) {
  return dgRequest.get({
    url: '/users/list',
    data: params
  })
}

export function createUser(user) {
  return dgRequest.post({
    url: '/users/register',
    data: user
  })
}

export function updateUser(user) {
  return dgRequest.post({
    url: '/users/update',
    data: user
  })
}

export function deleteUser(id) {
  return dgRequest.post({
    url: '/users/delete',
    data: {
      id
    }
  })
}